package org.zebra.mybatis.plus.core;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.zebra.mybatis.plus.ext.fill.annotation.FillTime;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zhanghongbin
 */
@Getter
@Setter
public class AuditedEntity<USERID_TYPE extends Serializable> {

    @ApiModelProperty("创建人标识")
    @TableField(fill = FieldFill.INSERT)
    private USERID_TYPE createBy;

    @ApiModelProperty("更新人标识")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private USERID_TYPE updateBy;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @FillTime
    private Date createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @FillTime
    private Date updateTime;
}
